<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="../../../static/layui/dist/layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../../static/layui/dist/layuiadmin/style/admin.css" media="all">
</head>
<body>

<script src="../../../static/layui/dist/layuiadmin/layui/layui.all.js"></script>



<script>
layer.open({
    type: 2,
    content: 'workreport/select',
    success: function(layero, index){
        var body = layer.getChildFrame('body', index);
        var iframeWin = window[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象，执行iframe页的方法：iframeWin.method();
        console.log(body.html()) //得到iframe页的body内容
        body.find('input').val('Hi，我是从父页来的')
    }
    });

</script>
</body>
</html>